package itdep.domain.profile;

import itdep.domain.IisEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * @author Ivan Khalopik
 * @version $Revision: 5 $ $Date: 2010-06-11 15:20:19 +0300 (Птн, 11 Июн 2010) $
 */
@Entity
@Table(name = "IDENTITY_CARD")
public class IdentityCard extends IisEntity {

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_IDENTITY_CARD_TYPE", nullable = false)
	private IdentityCardType type;

	@Column(name = "PERSONAL_NUMBER", nullable = true)
	private String personalNumber;

	@Column(name = "SERIES", nullable = true)
	private String series;

	@Column(name = "SERIAL_NUMBER", nullable = true)
	private String serialNumber;

	@Column(name = "ISSUE_DATE", nullable = true)
	private Date issueDate;

	@Column(name = "ISSUE_ORGANIZATION", nullable = true)
	private String issueOrganization;

	@Column(name = "INSURANCE_NUMBER", nullable = true)
	private String insuranceNumber;

	public IdentityCardType getType() {
		return type;
	}

	public void setType(IdentityCardType type) {
		this.type = type;
	}

	public String getPersonalNumber() {
		return personalNumber;
	}

	public void setPersonalNumber(final String personalNumber) {
		this.personalNumber = personalNumber;
	}

	public String getSeries() {
		return series;
	}

	public void setSeries(String series) {
		this.series = series;
	}

	public String getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(final String serialNumber) {
		this.serialNumber = serialNumber;
	}

	public Date getIssueDate() {
		return issueDate;
	}

	public void setIssueDate(final Date issueDate) {
		this.issueDate = issueDate;
	}

	public String getIssueOrganization() {
		return issueOrganization;
	}

	public void setIssueOrganization(final String issueOrganization) {
		this.issueOrganization = issueOrganization;
	}

	public String getInsuranceNumber() {
		return insuranceNumber;
	}

	public void setInsuranceNumber(String insuranceNumber) {
		this.insuranceNumber = insuranceNumber;
	}
}